from django.conf.urls import url
from . import views

urlpatterns = [
#用户注册
    url(r'^register/$', views.RegisterView.as_view()),
    #这里的路由是根据前端写的请求页面写的，具体可前往register.js进行查看
    #判断用户名是否重名
    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameCountView.as_view()),
    #判断电话是否重名
    url(r'^mobiles/(?P<mobile>1[345789]\d{9})/count/$', views.MobileCountView.as_view()),
    #用户登陆
    url(r'^login/$', views.LoginView.as_view()),
    #退出登陆
    url(r'^logut/$', views.LogoutView.as_view()),
    #用户中心
    url(r'^info/$', views.InfoView.as_view()),

]